-- GENERATED SPELL FOR [Frenzied Black Drake] --


function spell0_9461(pUnit, Event) --@Decimate,n/a--
pUnit:FullCastSpellOnTarget(13459,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_9461', 30270, 1)
end

function spell1_9461(pUnit, Event) --@Flame Breath,n/a--
pUnit:FullCastSpellOnTarget(9573,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_9461', 2000, 1)
end

function spell2_9461(pUnit, Event) --@Flame Buffet,n/a--
pUnit:FullCastSpellOnTarget(9574,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_9461', 47200, 1)
end

function spell3_9461(pUnit, Event) --@Frenzy,Self--
pUnit:FullCastSpellOnTarget(8269,pUnit)
pUnit:RegisterEvent('Sorts_9461', 616, 1)
end

function Sorts_9461(pUnit, Event)
local choix_sorts_9461 = math.random(0, 3)
if choix_sorts_9461 == 0 then
pUnit:RegisterEvent('spell0_9461', 1, 1)
end
if choix_sorts_9461 == 1 then
pUnit:RegisterEvent('spell1_9461', 1, 1)
end
if choix_sorts_9461 == 2 then
pUnit:RegisterEvent('spell2_9461', 1, 1)
end
if choix_sorts_9461 == 3 then
pUnit:RegisterEvent('spell3_9461', 1, 1)
end
end

function mob9461_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_9461', math.random(1500, 3000), 1)
end

function mob9461_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob9461_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob9461_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(9461, 1, 'mob9461_Action')
RegisterUnitEvent(9461, 2, 'mob9461_Leave')
RegisterUnitEvent(9461, 3, 'mob9461_Kill')
RegisterUnitEvent(9461, 4, 'mob9461_Die')
